home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 2271 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.8 KB

  1. Path: locutus.rchland.ibm.com!usenet
  2. From: pstaite@vnet.ibm.com
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Help in DOS functions and in graphics
  5. Date: 16 Jan 1996 15:19:50 GMT
  6. Organization: IBM OS/2 Device Driver Development  Rochester, MN
  7. Message-ID: <4dgfmm$11p2@locutus.rchland.ibm.com>
  8. References: <1770F7283S85.UZS7FC@ibm.rhrz.uni-bonn.de>
  9. Reply-To: pstaite@vnet.ibm.com
  10. NNTP-Posting-Host: warpone.rchland.ibm.com
  11. X-Newsreader: IBM NewsReader/2 v1.2
  12.  
  13. In <1770F7283S85.UZS7FC@ibm.rhrz.uni-bonn.de>, UZS7FC@ibm.rhrz.uni-bonn.de (Michael Kuesters) writes:
  14.  
  15. >1) I.E. I want to create my own DOS-shell under C++. How do I boot and start
  16. >EXE's from C++(i mean, from my program, of course)
  17.  
  18. Not really a general C++ question but...
  19.  
  20. Put a line:
  21.  
  22. SHELL=C:\myshell.exe
  23.  
  24. in CONFIG.SYS.  This should start your program instead of COMMAND.COM.
  25.  
  26. To load/run a program you'll want to check out spawn() and/or exec() -- 
  27. or one of the variants on these (eg. spawnlp(), execl() etc.)
  28.  
  29. >2) I want to read in a directory from the HD. How do I do this (other than
  30. >   searching whether "a" ,"aa", "aaa"  ... "zzzzzzzz.zzz" exists) ?
  31.  
  32. Check out the opendir(), readdir(), and closedir() functions in 
  33. dirent.h.  If your compiler doesn't have these (BC 3.0 is getting a 
  34. little old ;-) then look at the Borland routines findfirst(), 
  35. findnext().
  36.  
  37. >3) I wrote a graphics library for C++ (mostly using ASM), which is very fast,
  38. >   but when I include it, my program won't terminate, it will restart after
  39. >   the 'return 0' in the main program, even if I have a program like:
  40. >   initgraph() closegraph() return 0...
  41. >   Is there anyone who would help me debug this thing (should know about ASM)
  42.  
  43. You're on your own there... :-(
  44.  
  45.  
  46. Phil Staite, team OS/2
  47. internet: pstaite@vnet.ibm.com  internal: pstaite@rchland
  48.  
  49.